<?php

/**
 * @author nixiam59, PeoneEr
 */
require_once "core/db.php";

class Mmoney1 extends DB {

    private $_query;
    public $_fetch = array();

    protected function getAccountBalance() {
        /**
         *  баланс аккаунта
         */
        DB::getInstance()->openConnectionToLS();
        $this->_query = "SELECT `money` FROM `account_data` WHERE `name` = '$_SESSION[name]'";
        $this->_fetch = mysql_fetch_assoc(DB::getInstance()->sql($this->_query));
        return $this->_fetch['money'];
        DB::getInstance()->closeConnection();
        unset($this->_query, $this->_fetch);
    }

}

?>